package com.hzx.demo.activity;

import android.support.v7.app.AppCompatActivity;

import com.hzx.demo.R;
import com.hzx.demo.util.Entry;

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.ViewById;

import java.io.IOException;

import pl.droidsonroids.gif.GifDrawable;
import pl.droidsonroids.gif.GifImageView;

/**
 * Created by ldkxingzhe on 2016/6/14.
 */
@EActivity(R.layout.activity_gif)
@Entry(desc = "展示gif动画", createTime = "2016-06-14")
public class GifActivity extends AppCompatActivity{
    @SuppressWarnings("unused")
    private static final String TAG = "GifActivity";


    @ViewById(R.id.gif)
    protected GifImageView mGifImageView;

    @AfterViews
    protected void afterView(){
        try {
            GifDrawable gifDrawable = new GifDrawable(getResources(), R.raw.gif_test);
            mGifImageView.setImageDrawable(gifDrawable);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
